<template>
  <div class="win">
    <div class="content">
      <wxParse :content="advertData.content" />
    </div>
    <button @click="hr_index">返回首页</button>
    <i-toast id="toast" />
  </div>
</template>
<script>
import wxParse from "mpvue-wxparse";
export default {
  data() {
    return {
      bjurl: "",
      advertData: []
    };
  },
  methods: {
    //请求接口广告详情
    getAdvert() {
      this.$ajax("/home/order/advert", "get", {})
        .then(res => {
          
          if (res.status) {
            this.advertData = res.data;
          } else {
          }
        })
        .catch(err => {});
    },
    hr_index() {
      wx.switchTab({
        url: "../index/main"
      });
    }
  },
  components: {
    wxParse
  },
  onLoad(e) {
    Object.assign(this.$data, this.$options.data());
    this.bjurl = this.$bjurl;
    this.getAdvert();
  }
};
</script>

<style lang="scss" scoped>
@import url("~mpvue-wxparse/src/wxParse.css");

.win {
  background-color: #ffffff;
  padding-bottom: 50rpx;
  .content {
    width: 680rpx;
    margin: 0 auto;
    p {
      line-height: 1.5;
      color: #111111;
      font-size: 34rpx;
      font-weight: 400rpx;
    }
  }
  button {
    margin: 40rpx auto 0;
    width: 597rpx;
    height: 84rpx;
    background: linear-gradient(
      0deg,
      rgba(11, 208, 94, 1),
      rgba(11, 208, 173, 1)
    );
    border-radius: 42rpx;
    color: #ffffff;
    line-height: 84rpx;
    font-size: 36rpx;
    letter-spacing: 3rpx;
  }
}
</style>
